package com.suixun.service.impl;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.suixun.dao.SysOrgnizationMapper;
import com.suixun.entity.SysOrgnization;
import com.suixun.service.SysOrgnizationService;
@Service
public class SysOrgnizationServiceImpl implements SysOrgnizationService {

	@Resource
	private SysOrgnizationMapper sysOrgnizationMapper;
	
	@Override
	public void insert(String uuid, String orgName, String orgType, String puuid) {
		SysOrgnization sysOrgnization = new SysOrgnization();
		sysOrgnization.setCreateTime(new Date());
		sysOrgnization.setUuid(uuid);
		sysOrgnization.setOrgName(orgName);
		sysOrgnization.setOrgType(orgType);
		sysOrgnization.setPuuid(puuid);
		sysOrgnizationMapper.insert(sysOrgnization);
	}

	@Override
	public void update(String uuid, String orgName, String orgType, String puuid) {
		SysOrgnization sysOrgnization = new SysOrgnization();
		sysOrgnization.setUuid(uuid);
		sysOrgnization.setOrgName(orgName);
		sysOrgnization.setOrgType(orgType);
		sysOrgnization.setPuuid(puuid);
		sysOrgnizationMapper.updateByPrimaryKeySelective(sysOrgnization);
	}

}
